<?php
	if ($this->session->userdata('id') > 0) {
?>
	<h4 class="d_h4" style="width:92%;">Change your password </h4><p style="color:#42C8D1">Please fill all <font color="red">*</font> feilds required !!!</p>
			<p>&nbsp;</p>
            <div class="col col_13" style="
                    padding-left: 206px;
                    padding-right: 152px;
                    border: 1px solid #ccc;
                    margin-top: -23px">
            
            <div id="contact_form">
            <?php
			if(validation_errors() != ""){
			?>
            	<span id="error" style="background: none repeat scroll 0 0 #42C8D1;
    			color: red;
    			float: left;
    			line-height: 23px;
    			padding: 3px;
    			width: 539px;
    			border-radius: 3px;
    ">
    <a href="<?php echo site_url('pages/user_profile'); ?>">
    <img class="error" style="float:right; cursor:pointer;" src="<?php echo site_url(); ?>admin/img/close.gif" />
    </a>
             <?php
                    echo validation_errors(); 
             ?>
             	</span>
              
            <?php
            }
			
				if($this->uri->segment(4) == 'error'){
					?>
		<span id="error" style="background: none repeat scroll 0 0 #42C8D1;
    			color: white;
    			float: left;
    			line-height: 23px;
    			padding: 3px;
    			width: 539px;
    			border-radius: 3px;
                ">
                Change invalid ! :(  <a style="color:white" href="<?php echo site_url('pages/user_change_pass'); ?>"> Again</a> !!</span>
    <?php
	
				}
				
				echo '<br /><br />';
				echo form_open(site_url('pages/user_change_pass'),'POST');
				
				
				$pass = array(
						'name' => 'pass',
						'type' => 'password',
						'placeholder' => 'Your password...',
						'id' => 'author',
						'required' => '',
						'class' => 'required input_field'
						);
				$con_pass = array(
						'name' => 'con_pass',
						'type' => 'password',
						'placeholder' => 'Your confirm password...',
						'id' => 'author',
						'required' => '',
						'class' => 'required input_field'
						);
				$old_pass = array(
						'name' => 'old_pass',
						'type' => 'password',
						'placeholder' => 'Your old password...',
						'id' => 'author',
						'required' => '',
						'class' => 'required input_field',
						'autofocus' => ''
						);
				
				
			?>
                    <label for="subject">Old-password (<span class="signup">Your current password </span>)<font color="red">*</font>:</label> 
                    <?php echo form_input($old_pass); ?>
                    
                    <div class="cleaner h10"></div>
                    <label for="author">New Password (<span class="signup">More than 6 characters</span>)<font color="red">*</font>:</label> 
                    <?php echo form_input($pass); ?>
                    <div class="cleaner h10"></div>
                        
                    <label for="subject">Confirm-password (<span class="signup">More than 6 characters and match</span>)<font color="red">*</font>:</label> 
                    <?php echo form_input($con_pass); ?>
                    
                    
                  	<br />
                    
               
       				<br />
                    <br />
					<input type="submit" value="Change Now" id="submit" name="submit" class="submit_btn float_l" />
					<input type="reset" value="Reset" id="reset" name="reset" class="submit_btn float_r" />
					
               <?php
			   		echo form_close(); 
			   ?>
            </div>
		</div>
<?php }else{
	
	}
?>